package org.javaboy.vhr.mapper;

import org.apache.ibatis.annotations.Param;
import org.javaboy.vhr.model.Department;

import java.util.List;

public interface DepartmentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    Department selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);

    List<Department> getDepartmentByParentId(int parentId);

    String getDepPathByParentId(Integer parentId);

    void updateDepPathById(@Param("id") Integer id, @Param("depPath") String depPath);

    void updateIsParentById(Integer parentId);

    int getChildrenByParentId(Integer id);
}